//
//  SE_Header_TableViewCell.m
//  SkyEye
//
//  Created by dllo on 16/8/10.
//  Copyright © 2016年 SE. All rights reserved.
//

#import "SE_Header_TableViewCell.h"
#import "SE_Header_Model.h"

#define WIDTH self.contentView.bounds.size.width
#define HEIGHT self.contentView.bounds.size.height

@interface SE_Header_TableViewCell()

@property (nonatomic, retain) UILabel *titleLabel;

@end

@implementation SE_Header_TableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.font = [UIFont boldSystemFontOfSize:15];
        self.titleLabel.font = [UIFont systemFontOfSize:20];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:self.titleLabel];
    }
    return self;
}

-(void)layoutSubviews{
    
    self.titleLabel.frame = CGRectMake(0, (HEIGHT - HEIGHT * 0.5) / 2, WIDTH, HEIGHT * 0.5);
    
}

-(void)setHeaderModel:(SE_Header_Model *)headerModel{
    _headerModel = headerModel;
    self.titleLabel.text = headerModel.text;
}



@end

















